package com.chn.hourent.model;

public class House {//House类，仅用于创建包含所需参数的类以及其配套的基础方法
    //编号 房主姓名 联系电话 地址 租金 状态(已出租/未出租)
    private int id;
    private String name;
    private String num;
    private String address;
    private int rent;
    private String state;

    public House(int id, String name, String num, String address, int rent, String state) {
        this.id = id;
        this.name = name;
        this.num = num;
        this.address = address;
        this.rent = rent;
        this.state = state;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getRent() {
        return rent;
    }

    public void setRent(int rent) {
        this.rent = rent;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    //为美观输出格式，在此重写toString方法
    @Override
    public String toString() {
        return "\t" + id +
                "\t" + name +
                "\t\t" + num +
                "\t" + address +
                "\t" + rent +
                "\t" + state;
    }
}
